<template>
	<div class="div-block">
		<h3>.这是一个孙子组件 </h3>
		<span> 改变parent组建的值 </span>
		<button @click="handleClick">点击改变</button>
	</div>
</template>

<script>
	import middleware from './middleware'
	export default {
		created: function () {
			console.log(this.$attrs)
		},
		methods: {
			handleClick () {
				middleware.$emit('say-hello', 'hahaha')
			}
		}
	}
</script>

<style lang="stylus">
	.div-block {
		margin: 40px 0;
	}
</style>